/*
 * GraphicGraph.cpp
 *
 *  Created on: Jun 28, 2012
 *      Author: kgills
 */

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <fstream>
#include <math.h>
#include <string>
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Menu_Bar.H>
#include <FL/Fl_Native_File_Chooser.H>
#include <FL/fl_draw.H>


#define BG_COLOR   45




using namespace std;


//void BrowserCallback(Fl_Widget *w, void *data);

struct vert
{
	vector<int> edges;
	int parent;
	int room_number;
	bool visited;
};


class MyApp : public Fl_Box {
public:
    Fl_Window *win;
    Fl_Menu_Bar *menubar;

    vector<vert> list;
    int size;

    void open_list();
    void print_list();
    void draw();
    void Menu_CB2();
    void perform_DFS();
    void print_path();
    void DFS_visit(vert & u);

    static void Menu_CB(Fl_Widget*w, void*data) {
            MyApp *o = (MyApp*)data;
            o->Menu_CB2();
        }



    MyApp(int X,int Y,int W,int H,const char*L=0) : Fl_Box(X,Y,W,H,L) {
            box(FL_FLAT_BOX);
            color(BG_COLOR);
    }



};





